<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="~{template}">
<head>
<title>注册</title>
</head>
<body>
<div layout:fragment="content">
    <div class="form-wrapper col-lg-6 col-md-6 col-sm-6 col-md-offset-1">
        <h2>注册</h2><br/>
        <form id="register_form" class="form-horizontal" role="form" @submit.prevent="register">
            <div class="form-group">
                <label for="card"><em>*</em>账号:</label>
                <input type="text" class="form-control" placeholder="卡号" id="card"
                       v-model="accountModel.card" minlength="6" maxlength="16" required/>
            </div>
            <div class="form-group">
                <label for="username"><em>*</em>用户名:</label>
                <input type="text" class="form-control" placeholder="用户名" id="username"
                       v-model="accountModel.name" minlength="2" maxlength="16" required/>
            </div>
            <div class="form-group">
                <label for="password"><em>*</em>密码:</label>
                <input type="password" class="form-control" placeholder="密码" id="password"
                       v-model="accountModel.password" minlength="6" maxlength="32" required/>
            </div>
            <div class="form-group">
                <label for="confirm_password"><em>*</em>确认密码:</label>
                <input type="password" class="form-control" placeholder="确认密码" id="confirm_password"
                       v-model="accountModel.confirm_password" minlength="6" maxlength="32" required/>
            </div>
            <div class="form-group">
                <div class="row">
                    <div class="col-md-6 col-sm-4">
                        <button type="submit" class="btn btn-info btn-lg pull-left">注册</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div layout:fragment="script">
<script th:src="@{/assets/libs/vue-resource/1.3.4/vue-resource.min.js}"></script>

<script th:src="@{/assets/js/register.js}"></script>
</div>
</body>
</html>
